<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8" />
<title></title>
<link rel="stylesheet"
	href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script
	src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script
	src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
	function getQueryVariable(variable) {
		var query = window.location.search.substring(1);
		var vars = query.split("&");
		for (var i = 0; i < vars.length; i++) {
			var pair = vars[i].split("=");
			if (pair[0] == variable) {
				return pair[1];
			}
		}
		return (false);
	}
</script>
</head>
<body>
	<div class="navbar navbar-default">
		<div class="container ">
			<p class="navbar-text">SSO Demo</p>
		</div>
	</div>
	<div class="container ">
		<div class="row">
			<div class="col-md-1">
				<a class="yidu btn btn-info" href="" target="_blank">e读服务</a>
			</div>
			<div class="col-md-1"></div>
			<div class="col-md-1">
				<a class="btn btn-info" href="pages/my-job.html" target="_blank">myJob服务</a>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	var okapiToken = getQueryVariable('okapiToken');
	var artifact = getQueryVariable("artifact");
	//alert("okapiToken:" + okapiToken);
	//alert("artifact:" + artifact);

	$("a.yidu").attr(
			"href",
			"http://www.yidu.edu.cn?authresult=ture&tenantcode=100000&artifact="
					+ artifact)

	var storage = window.sessionStorage;
	storage.setItem("token", okapiToken);
</script>
</html>